<!DOCTYPE html>
<html lang="en">
<head>
    <title>添加跟踪</title>
    <meta http-equiv="pragma" content="no-cache">
    <meta http-equiv="Cache-Control" content="no-store, must-revalidate">
    <meta http-equiv="expires" content="Wed, 26 Feb 1997 08:21:57 GMT">
    <meta http-equiv="expires" content="-1">
    <meta content="width=device-width, initial-scale=1, maximum-scale=1, user-scalable=no" name="viewport">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta charset="utf-8">
    <meta name="viewport" content="width=device-width, initial-scale=1">
    <meta http-equiv="refresh" content="1200">
    <link rel="shortcut icon" href="/dist/img/icon.png" type="image/x-icon">
    <!-- Bootstrap 3.3.6 -->
    <link rel="stylesheet" href="/dist/plugins/bootstrap/css/bootstrap.min.css">
    <!--字体-->
    <link rel="stylesheet" href="/dist/css/font-awesome.min.css">
    <!--图标-->
    <link rel="stylesheet" href="/dist/css/ionicons.min.css">
    <!--OA主样式-->
    <link rel="stylesheet" href="/dist/css/OA.min.css?t=86e2297f">
    <link rel="stylesheet" href="/dist/css/skins/OA-skins.min.css?t=222aea35">
    <style>
        .lineOne {
            text-align: left;
        }

        .lineOne span {
            max-height: 20px;
            line-height: 20px;
            overflow: hidden;
            text-overflow: ellipsis;
            display: -webkit-box;
            -webkit-box-orient: vertical;
            -webkit-line-clamp: 1;
            text-align: left;
        }

        .div-td-content-more {
            position: absolute;
            height: auto;
            z-index: 999;
            line-height: 20px;
            background-color: #d3e8fd;
            padding: 8px 6px;
            border: 1px solid #e8e8ea;
            display: none;
        }

        .div-td-content-more i {
            width: 15px;
            height: 12px;
            background: url("/dist/img/more-icon.png");
            position: absolute;
            left: 50px;
            top: -12px;
        }

        .tdColor {
            width:190px;
            background-color: #f8f8f8;
        }
        .td-value {
            text-align: left !important;
            vertical-align: middle;
            word-wrap: break-word;
            color: #2a8cec !important;
        }

        .td-value span {
            display: inline-block;
            max-height: 56px;
            overflow: hidden;
            padding: 0 6px;
            word-wrap: break-word;
            text-align: center !important;
        }
        .td-value1 {
            text-align: left !important;
            vertical-align: middle;
            word-wrap: break-word;
            color: #2a8cec !important;
        }
        .td-value1 .user{
            display: inline-block;
            float: left;
            overflow: hidden;
            cursor: pointer;
        }
        .user.select{
            color: #fff;
            background-color: #045B9E;
        }
        .td-value1 input,textarea{
            width: 100%;
            border: 0;
            outline: none;
            padding-left: 5px;
        }
        .weChat{
            position: absolute;
            left: 200px;
            margin-top: 2px;
        }
        .weChat input{
            position: absolute;
            bottom: 18px;
            left: -15px;
        }
    </style>
</head>
<body>
<section class="content" id="app">
    <table class="table table-bordered text-center table-width" style="margin: 0 auto;width:650px">
        <tbody>
            <tr>
                <td class="tdColor">跟踪内容描述</td>
                <td colspan="3" class="td-value1">
                    <textarea rows="8" style="width: 450px;resize: none" v-model="detailParm.trackContent"></textarea>
                </td>
            </tr>
        </tbody>
    </table>
    
    <div class="south" style="height:50px;line-height:50px;text-align:center;">
        <!-- <p class="weChat"><input type="checkbox"/> 微信通知抄送人</p> -->
        <input type="button" value="保存" class="btn oaBtn btn-sm" @click="submitData()"/>
    </div>
</section>
<!--JQ-->
<script src="https://file.ggxqce.com/web/jquery-2.2.3.min.js"></script>
<!--插件JS-->
<script src="https://file.ggxqce.com/web/bootstrap.min.js"></script>
<!--框架已定义 JS-->
<script src="/dist/js/app_iframe.js?t=8e743a31"></script>
<!--oa自定义  JS-->
<script src="/dist/js/oa.js?t=54c6b89c"></script>
<script src="https://file.ggxqce.com/web/vue.min.js"></script>
<script type="text/javascript" src="/dist/plugins/lhgdialog/lhgdialog.min.js?self=true"></script>
<script type="text/javascript" src="/dist/plugins/My97DatePicker/WdatePicker.js"></script>
<script type="text/javascript">
    var api = frameElement.api, W = api.opener;
    var app = new Vue({
        el: '#app',
        data: {
            detailParm:{
                checked:false,
                mainId:"",
                trackTitle:"",
                trackContent:"",
                userId:getCurrentUser().id,
                userName:getCurrentUser().name,
                principal:"",
                publisher:""
            }
        },
        methods: {
            submitData:function(){
                if(this.detailParm.trackContent == ""){
                    alert("跟踪内容不能为空");
                    return false;
                }
                if($(".weChat input").is(':checked')){
                    this.detailParm.checked = true;
                }
                $.wyui.postMethod(urlConfig.wreport.wreportUnfinish.addTrack, trimRN(this.detailParm), function (data) {
                    // alert("操作成功");
                    parent.refresh();
                    api.close();
                });
            }
        },
        mounted: function () {
            this.detailParm.mainId = $.wyui.page.urlParams.mainId;
            this.detailParm.principal = $.wyui.page.urlParams.principal;
            this.detailParm.publisher = $.wyui.page.urlParams.publisher;
            this.detailParm.trackTitle = $.wyui.page.urlParams.trackTitle;
        }
    });
</script>
</body>
</html>